﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ctrBaiVietList.ascx.cs"
    Inherits="TCHSHue.Modules.AdminControl.BaiViet.ctrBaiVietList" %>
<div id="trangthai" class="inbox">
    <h3 class="tieude">
        BÀI VIẾT</h3>
    <table style="width: 100%">
        <tr>
            <td colspan="2" class="line">
            </td>
        </tr>
    </table>
    <br />
    <asp:HyperLink ID="HyperLink1" CssClass="box add" NavigateUrl="~/Modules/Admin.aspx?mode=thembaiviet"
        runat="server">Tạo mới</asp:HyperLink>
    <br />
    <br />
    <table style="width: 100%">
        <tr>
            <td style="width: 10%">
                Thể loại
            </td>
            <td>
                <asp:DropDownList ID="ddlTheLoai" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td style="width: 10%">
                Tình trạng
            </td>
            <td>
                <asp:DropDownList ID="ddlTinhTrang" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td style="width: 10%">
            </td>
            <td>
                <asp:Button ID="bntLoc" runat="server" Text="Lọc" OnClick="bntLoc_Click" />
            </td>
        </tr>
    </table>
    <div class="tableAdmin">
        <asp:GridView ID="gridBaiViet" runat="server" AutoGenerateColumns="False" EnableModelValidation="True">
            <Columns>
                <asp:BoundField DataField="ChuDe" HeaderText="Tiêu đề" />
                <asp:BoundField DataField="HoTen" HeaderText="Người đăng" />
                <asp:BoundField DataField="TenChuyenMuc" HeaderText="Chuyên mục" />
                <asp:BoundField DataField="NgayViet" HeaderText="Ngày viết" />
                <asp:BoundField DataField="TinhTrang" HeaderText="Tình trạng" />
                <asp:TemplateField HeaderText="Thao tác">
                    <ItemTemplate>
                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Style/Images/edit.png"
                            CommandArgument='<%# Eval("MaBaiViet") %>' OnCommand="RedirectEdit" />
                        <asp:ImageButton ID="ImageButton2" CommandArgument='<%#Eval("MaBaiViet") %>' OnCommand="Delete"
                            OnClientClick="return confirm('Bạn có chắc muốn xóa?')" runat="server" ImageUrl="~/Style/Images/delete.png" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                Hiện tại không có bài viết nào
            </EmptyDataTemplate>
        </asp:GridView>
    </div>
    <br />
    <div id="divPaging" runat="server" style="text-align: center; margin-top: 5px;">
    </div>
</div>
